import Cookies from 'js-cookie'

const TokenKey = 'ttk'
const RoleKey = 'role'
const UserNameKey = 'usrename'
const REALNAMEKEY = 'realName'
const UserIdKey = 'id'
const UserLogo = 'userlogo'
const RESOURCETYPE = 'resourceType'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getRole() {
  return Cookies.get(RoleKey)
}

export function setRole(role) {
  return Cookies.set(RoleKey, role)
}

export function removeRole() {
  return Cookies.remove(RoleKey)
}

export function getUserName() {
  return Cookies.get(UserNameKey)
}

export function setUserName(username) {
  return Cookies.set(UserNameKey, username)
}

export function removeUserName() {
  return Cookies.remove(UserNameKey)
}

export function getRealName() {
  return Cookies.get(REALNAMEKEY)
}

export function setRealName(val) {
  return Cookies.set(REALNAMEKEY, val)
}

export function removeRealName() {
  return Cookies.remove(REALNAMEKEY)
}

export function getUserId() {
  return Cookies.get(UserIdKey)
}
export function setUserId(userid) {
  return Cookies.set(UserIdKey, userid)
}
export function removeUserId() {
  return Cookies.remove(UserIdKey)
}

export function getUserLogo() {
  return Cookies.get(UserLogo)
}
export function setUserLogo(userlogo) {
  return Cookies.set(UserLogo, userlogo)
}
export function removeUserLogo() {
  return Cookies.remove(UserLogo)
}

export function getResourceType() {
  return Cookies.get(RESOURCETYPE)
}
export function setResourceType(val) {
  return Cookies.set(RESOURCETYPE, val)
}
export function removeResourceType() {
  return Cookies.remove(RESOURCETYPE)
}
